CREATE OR REPLACE TRIGGER USTLV100.TRIG_LOG_TRANSACTION
  BEFORE INSERT 
  ON USTLV100.LOGTRANSACTION
  FOR EACH ROW
  WHEN (new.ID is null)
DECLARE
  v_id USTLV100.LOGTRANSACTION.ID%TYPE;
BEGIN
  SELECT USTLV100.SEC_LOG_TANSACTION.nextval INTO v_id FROM DUAL;
  :new.ID := v_id;
END TRIG_LOG_TRANSACTION;
/